package com.caigou.modules.service.network.api

import com.caigou.comm.base.bean.HttpResult
import com.caigou.modules.service.baen.PlatformItemBean
import com.caigou.modules.service.baen.WebsiteCollectBean
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * @author #Suyghur.
 * Created on 2021/11/11
 */
interface HttpServiceApiService {

    @GET("/api/personal/website/collect/list")
    fun getWebsiteCollectList(@Query("page") page: Long, @Query("limit") limit: Long, @Query("userId") userId: String): Flow<HttpResult<WebsiteCollectBean>>

    @POST("/api/personal/website/collect/delete")
    fun deleteWebsiteCollect(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @POST("/api/personal/website/collect/add")
    fun addWebsiteCollect(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @GET("/api/personal/platform/list")
    fun getPlatformList(): Flow<HttpResult<MutableList<PlatformItemBean>>>

}
